﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../lib/html5.js"></script>
    <script type="text/javascript" src="../lib/respond.min.js"></script>
    <script type="text/javascript" src="../lib/PIE_IE678.js"></script>
    <![endif]-->
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>顺查记录表</title>
</head>
<body>
    <div class="pd-5">

        <div class="row cl" id="findfdiv">
            <!--    <div class="formControls col-2">
                     <span class="select-box">
                         <select class="select" size="1" name="finddatabranchid_dn" id="finddatabranchid">
                         </select></span>
                 </div>-->

            <div class="formControls col-2">
                <input type="text" class="input-text" placeholder="任务编号" id="findtaskno" name="findtaskno">
            </div>
            <div class="formControls col-2">
                <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd 00:00:00'})" placeholder="采收起始时间" id="findnoworkstarttime_times" name="findnoworkstarttime_times" class="input-text Wdate">
            </div>
            <div class="formControls col-2">
                <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd 23:59:59'})" placeholder="采收结束时间" id="findnoworkstarttime_timee" name="findnoworkstarttime_timee" class="input-text Wdate">

            </div>

            <div class="formControls  skin-minimal col-2">
                <div class="check-box">
                    <input type="checkbox" id="c_dcinfo" name="c_dcinfo" value="1" checked="checked" />
                    <label for="ffv71">包括地块作业</label>
                </div>
            </div>


            <div class="formControls col-2">
                <button onclick="hcrainpage()" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 查询</button>
            </div>
        </div>

        <div id="hcvueapp">
            <div class="cl pd-5 bg-1 bk-gray mt-5 ">
                <div class="form form-horizontal">
                    <div class="row cl" style="margin-top: 0px">
                        <span class="panel panel-default" v-for="site in listinfo">
                            <button class="btn radius btn-secondary" type="button" @click="loadtaskinfo(site.id,site.taskno)">{{site.fv1}}-{{site.taskno}}-{{site.tasksctypename}}</button>

                        </span>
                    </div>
                </div>
            </div>
            <div class="cl pd-5 bg-1 bk-gray mt-5">
                <span class="l">
                    <button onclick="method5('tableoute')" class="btn btn-secondary  round" id="Button1" name=""><i class="Hui-iconfont">&#xe644;</i>导出</button>
                </span>
                <span class="r">提示：顺查记录表-任务<strong>^_^</strong> </span>

            </div>
            <div class="page-container" id="tableoute">
                <table class="table table-border table-bordered table-bg" border="1" bordercolor="#000000" cellspacing="0" cellpadding="2" style="border-collapse:collapse;">
                    <thead>
                        <tr>
                            <th colspan="13" scope="col" style="text-align:center;font-size: 30px; font-weight: bold; color: #0000FF">生产顺查记录表（按任务<lable id="lb_taskno"></lable>）</th>
                        </tr>
                        <tr class="text-c" style="text-align:left;">
                            <th colspan="1" style="text-align:left;">日期：</th>
                            <td style="text-align:left;" colspan="4"> {{task.taskstarttime}}</td>
                            <th colspan="2" style="text-align:left;">生产基地名称：</th>
                            <td style="text-align:left;" colspan="6"> {{task.databranchname}}</td>
                        </tr>
                        <tr class="text-c" style="text-align:left;">
                            <th colspan="1" style="text-align:left;">地块编号：</th>
                            <td style="text-align:left;" colspan="4"> {{task.dcname}}</td>
                            <th colspan="2" style="text-align:left;">地块面积（亩）：</th>
                            <td style="text-align:left;" colspan="3"> {{task.dcmj}}</td>
                            <th colspan="1" style="text-align:left;">种植面积（亩）：</th>
                            <td style="text-align:left;" colspan="1"> {{task.taskmj}}</td>

                        </tr>
                        <tr class="text-c" style="text-align:left;">
                            <th colspan="1" style="text-align:left;">地块类型：</th>
                            <td style="text-align:left;" colspan="2"> {{task.dctype}}</td>
                            <th colspan="2" style="text-align:left;">主栽作物品种名称：</th>
                            <td style="text-align:left;" colspan="2"> {{task.tasksctypename}}</td>

                            <td colspan="3" style="text-align:left;"><span style="font-weight: bold"></span>  {{task.zzsourepc}}/{{task.jmzzsourepc}}/{{task.ymchangetaskno}}/ {{task.bjfs}}</td>
                            <th colspan="1" style="text-align:left;">用量：</th>
                            <td style="text-align:left;" colspan="2"> 【种子{{task.zzsoureccount}}/{{task.zzunit}}】[移栽{{task.ymchangetaskcount}}]</td>
                        </tr>
                        <tr class="text-c">
                            <th rowspan="2"> 时间</th>
                            <th rowspan="2"> 天气</th>
                            <th rowspan="2"> 作业类型</th>
                            <th rowspan="2"> 作业工具</th>
                            <th rowspan="2"> 防治对象</th>
                            <th rowspan="1" colspan="4"> 投入品明细</th>
                            <th rowspan="2"> 采收重量</th>
                            <th rowspan="2"> 作业人员</th>
                            <th rowspan="2"> 备注</th>
                        </tr>
                        <tr class="text-c">

                            <th rowspan="1"> 分类</th>
                            <th rowspan="1"> 名称/稀释倍数</th>
                            <th rowspan="1">批次</th>
                            <th rowspan="1"> 用量</th>
                        </tr>
                    </thead>
                    <tbody>

                        <tr class="text-c" v-for="twork in allworks" style="font-style: normal;   color: #800000;" title="作业">

                            <td>{{twork.worktime}} </td>
                            <td>{{twork.dayTctype}}</td>
                            <td><span style="font-weight: bold">{{twork.worktype}}</span></td>
                            <td>{{twork.worktoolname}}</td>
                            <td>{{twork.workfjobj}}</td>

                            <td><!--5-->
                                <div v-if="twork.worktfl=='dcwork'">{{twork.zbptype1}}</div>
                                <div v-if="twork.worktfl=='taskwork'">
                                    {{twork.zbptype1}}
                                    <div v-if="twork.zbpremark2.length >0">{{twork.zbptype2}}</div>
                                    <div v-if="twork.zbpremark3.length >0">{{twork.zbptype3}}</div>
                                    <div v-if="twork.zbpremark4.length >0">{{twork.zbptype4}}</div>
                                </div>
                                <div v-if="twork.worktfl=='taskGet'"></div>
                                <div v-if="twork.worktfl=='seftjgout'">{{twork.productstate}}</div>
                                <div v-if="twork.worktfl=='seftjgend'">{{twork.productstate}}</div>
                                <div v-if="twork.worktfl=='sefttocenter'">{{twork.productstate}}</div>
                                <div v-if="twork.worktfl=='pccenterin'">{{twork.productstate}}</div>
                                <div v-if="twork.worktfl=='pccenterjgout'">{{twork.productstate}}</div>
                                <div v-if="twork.worktfl=='pccenterjgend'">{{twork.productstate}}</div>
                                <div v-if="twork.worktfl=='taskcodeinfo'">{{twork.productstate}}</div>
                                <div v-if="twork.worktfl=='pccenterouttoend'">{{twork.productstate}}</div>
                            </td>
                            <td><!--6-->
                                <div v-if="twork.worktfl=='dcwork'">{{twork.zbpname1}}/<span style="font-size: xx-small">{{twork.zbpbs1}}</span></div>
                                <div v-if="twork.worktfl=='taskwork'">
                                    {{twork.zbpname1}}/<span style="font-size: xx-small">{{twork.zbpbs1}}</span>
                                    <div v-if="twork.zbpremark2.length >0">{{twork.zbpname2}}/<span style="font-size: xx-small">{{twork.zbpbs2}}</span></div>
                                    <div v-if="twork.zbpremark3.length >0">{{twork.zbpname3}}/<span style="font-size: xx-small">{{twork.zbpbs3}}</span></div>
                                    <div v-if="twork.zbpremark4.length >0">{{twork.zbpname4}}/<span style="font-size: xx-small">{{twork.zbpbs4}}</span></div>
                                </div>
                                <div v-if="twork.worktfl=='taskGet'"></div>
                                <div v-if="twork.worktfl=='seftjgout'">{{twork.productname}}</div>
                                <div v-if="twork.worktfl=='seftjgend'">{{twork.productname}}</div>
                                <div v-if="twork.worktfl=='sefttocenter'">{{twork.productname}}</div>
                                <div v-if="twork.worktfl=='pccenterin'">{{twork.productname}}</div>
                                <div v-if="twork.worktfl=='pccenterjgout'">{{twork.productname}}</div>
                                <div v-if="twork.worktfl=='pccenterjgend'">{{twork.productname}}</div>
                                <div v-if="twork.worktfl=='taskcodeinfo'">{{twork.productname}}</div>
                                <div v-if="twork.worktfl=='pccenterouttoend'">{{twork.productname}}</div>
                            </td>
                            <td><!--7-->
                                <div v-if="twork.worktfl=='dcwork'">{{twork.zbpremark1}}</div>
                                <div v-if="twork.worktfl=='taskwork'">
                                    {{twork.zbpremark1}}
                                    <div v-if="twork.zbpremark2.length >0">{{twork.zbpremark2}}</div>
                                    <div v-if="twork.zbpremark3.length >0">{{twork.zbpremark3}}</div>
                                    <div v-if="twork.zbpremark4.length >0">{{twork.zbpremark4}}</div>
                                </div>
                                <div v-if="twork.worktfl=='taskGet'"></div>
                                <div v-if="twork.worktfl=='seftjgout'">{{twork.inouttype}}/数量：{{twork.storeall}}</div>
                                <div v-if="twork.worktfl=='seftjgend'">{{twork.inouttype}}/用料：{{twork.storealluseall}}</div>
                                <div v-if="twork.worktfl=='sefttocenter'">
                                    {{twork.inouttype}}/{{twork.carinfo}}/{{twork.inoutstorestate}}
                                    <br />{{twork.logforys1}}
                                </div>
                                <div v-if="twork.worktfl=='pccenterin'">{{twork.inouttype}}/{{twork.carinfo}}/{{twork.inoutstorestate}}</div>
                                <div v-if="twork.worktfl=='pccenterjgout'">{{twork.inouttype}}/{{twork.carinfo}}/{{twork.inoutstorestate}}</div>
                                <div v-if="twork.worktfl=='pccenterjgend'">{{twork.inouttype}}/{{twork.carinfo}}/{{twork.inoutstorestate}}/用量{{twork.storealluseall}}</div>
                                <div v-if="twork.worktfl=='taskcodeinfo'">开始码：{{twork.startcode}}-结束码：{{twork.endcode}}</div>
                                <div v-if="twork.worktfl=='pccenterouttoend'">
                                    {{twork.inouttype}}/{{twork.carinfo}}{{twork.scname}}
                                    /{{twork.inoutstorestate}}/用量{{twork.storealluseall}}
                                    <br />{{twork.logforys1}}
                                </div>
                            </td>
                            <td><!--8-->
                                <div v-if="twork.worktfl=='dcwork'">{{twork.zbpyl1}}</div>
                                <div v-if="twork.worktfl=='taskwork'">
                                    {{twork.zbpyl1}}/{{twork.zbpunit1}}
                                    <div v-if="twork.zbpremark2.length >0">{{twork.zbpyl2}}/{{twork.zbpunit2}}</div>
                                    <div v-if="twork.zbpremark3.length >0">{{twork.zbpyl3}}/{{twork.zbpunit3}}</div>
                                    <div v-if="twork.zbpremark4.length >0">{{twork.zbpyl4}}/{{twork.zbpunit4}}</div>
                                </div>
                                <div v-if="twork.worktfl=='taskGet'"></div>
                                <div v-if="twork.worktfl=='seftjgout'"> </div>
                                <div v-if="twork.worktfl=='seftjgend'">数量：{{twork.storeall}}Kg</div>
                                <div v-if="twork.worktfl=='sefttocenter'">数量：{{twork.storeall}}Kg</div>
                                <div v-if="twork.worktfl=='pccenterin'">数量：{{twork.storeall}}Kg</div>
                                <div v-if="twork.worktfl=='pccenterjgout'">数量：{{twork.storeall}}Kg</div>
                                <div v-if="twork.worktfl=='pccenterjgend'">数量：{{twork.storeall}}Kg</div>
                                <div v-if="twork.worktfl=='taskcodeinfo'">数量：{{twork.storeall}}枚 </div>
                                <div v-if="twork.worktfl=='pccenterouttoend'">数量：{{twork.storeall}}Kg</div>
                            </td>
                            <td>
                                <div v-if="twork.worktfl=='dcwork'">/</div>
                                <div v-if="twork.worktfl=='taskwork'">/</div>
                                <div v-if="twork.worktfl=='taskGet'">{{twork.infonv3}}Kg/{{twork.infonv6}}框</div>
                                <div v-if="twork.worktfl=='seftjgout'">规格(包)：{{twork.storefortype1}}/{{twork.storefortype2}}/{{twork.storefortype3}}</div>
                                <div v-if="twork.worktfl=='seftjgend'">规格(包)：{{twork.storefortype1}}/{{twork.storefortype2}}/{{twork.storefortype3}}</div>
                                <div v-if="twork.worktfl=='sefttocenter'">规格(包)：{{twork.storefortype1}}/{{twork.storefortype2}}/{{twork.storefortype3}}</div>
                                <div v-if="twork.worktfl=='pccenterin'">规格(包)：{{twork.storefortype1}}/{{twork.storefortype2}}/{{twork.storefortype3}}</div>
                                <div v-if="twork.worktfl=='pccenterjgout'">规格(包)：{{twork.storefortype1}}/{{twork.storefortype2}}/{{twork.storefortype3}}</div>
                                <div v-if="twork.worktfl=='pccenterjgend'">规格(包)：{{twork.storefortype1}}/{{twork.storefortype2}}/{{twork.storefortype3}}</div>
                                <div v-if="twork.worktfl=='taskcodeinfo'"> </div>
                                <div v-if="twork.worktfl=='pccenterouttoend'">规格(包)：{{twork.storefortype1}}/{{twork.storefortype2}}/{{twork.storefortype3}}</div>
                            </td>
                            <td>
                                <div v-if="twork.worktfl=='dcwork'">{{twork.infofv3}}</div>
                                <div v-if="twork.worktfl=='taskwork'">{{twork.infofv3}}</div>
                                <div v-if="twork.worktfl=='taskGet'">{{twork.infofv3}}</div>
                                <div v-if="twork.worktfl=='seftjgout'">{{twork.dataaddusername}}</div>
                                <div v-if="twork.worktfl=='seftjgend'">{{twork.dataaddusername}}</div>
                                <div v-if="twork.worktfl=='sefttocenter'">{{twork.dataaddusername}}</div>
                                <div v-if="twork.worktfl=='pccenterin'">{{twork.dataaddusername}}</div>
                                <div v-if="twork.worktfl=='pccenterjgout'">{{twork.dataaddusername}}</div>
                                <div v-if="twork.worktfl=='pccenterjgend'">{{twork.dataaddusername}}</div>
                                <div v-if="twork.worktfl=='taskcodeinfo'">{{twork.dataaddusername}}</div>
                                <div v-if="twork.worktfl=='pccenterouttoend'">{{twork.dataaddusername}}</div>
                            </td>
                            <td>
                                <div v-if="twork.worktfl=='dcwork'">{{twork.infofv6}}</div>
                                <div v-if="twork.worktfl=='taskwork'">{{twork.infofv6}}</div>
                                <div v-if="twork.worktfl=='taskGet'">{{twork.infofv12}}</div>
                                <div v-if="twork.worktfl=='seftjgout'">{{twork.outdesccfvecxzasrfdfcdghytgngb}}</div>
                                <div v-if="twork.worktfl=='seftjgend'">{{twork.outdesc}}{{twork.remarks}}</div>
                                <div v-if="twork.worktfl=='sefttocenter'">{{twork.outdesc}}{{twork.remarks}}</div>
                                <div v-if="twork.worktfl=='pccenterin'">{{twork.outdesc}}{{twork.remarks}}{{twork.outstate}}</div>
                                <div v-if="twork.worktfl=='pccenterjgout'">{{twork.outdesc}}{{twork.remarks}}{{twork.outstate}}</div>
                                <div v-if="twork.worktfl=='pccenterjgend'">{{twork.outdesc}}{{twork.remarks}}{{twork.outstate}}</div>
                                <div v-if="twork.worktfl=='taskcodeinfo'">{{twork.outdesc}}{{twork.remarks}}</div>
                                <div v-if="twork.worktfl=='pccenterouttoend'">{{twork.outdesc}}{{twork.remarks}}</div>
                            </td>
                        </tr>




                    </tbody>
                </table>

            </div>
        </div>

        <div class="mt-5 ml-20">

            <div class="mt-5 row">
                <div id="page1"></div>
            </div>

        </div>
    </div>

    <script type="text/javascript" src="../lib/layui/layui2.js"></script>
    <script type="text/javascript" src="../js/vue.min.js"></script>
    <script>
        var hcvueapp = new Vue({
            el: '#hcvueapp',
            data: {
                listinfo: [],
                taskallinfo: {},
                task: {}, taskwork: [], dcwork: [], taskGet: [], taskworkbj: []
                , seftjgout: [], seftjgend: [], sefttocenter: []
                , pccenterin: [], pccenterjgout: [], pccenterjgend: []
                , taskcodeinfo: [], pccenterouttoend: [], allworks: []
            },
            methods: {

            }
        });
        //   + ",\"seftjgout\":" + 自加工出库
        //+ ",\"seftjgend\":" + 自加工入库采摘加工入库
        // + ",\"sefttocenter\":" + 基地库出库运输
        //  + ",\"pccenterin\":" + 批次中心库运输入库
        //   + ",\"pccenterjgout\":" + 批次中心库取料加工
        //    + ",\"pccenterjgend\":" + 批次中心库取料加工完成及半成品进入待发库
        //     + ",\"taskcodeinfo\":" + 中心库贴码信息
        //      + ",\"pccenterouttoend\":" + 批次发贷信息
    </script>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
    <script type="text/javascript" src="../lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="../lib/layui/layui.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_list.js"></script>

    <script type="text/javascript">
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        function getDateByChange(date, days) {
            if (days == undefined || days == '') {
                days = 1;
            }
            var date = new Date(date);
            date.setHours(date.getHours() - days);
            return date;
        }


        hcui_ajaxasync = false;
        var uiform = null;
        var whereaddinfo = "";
        //$("#findtaskstarttime_times").val((getDateByChange(new Date(), 24 * 45)).Format("yyyy-MM-dd"));
        if (getUrlParam("taskno")) $("#findtaskno").val(getUrlParam("taskno"));

        $("#findnoworkstarttime_times").val((getDateByChange(new Date(), 24 * 5)).Format("yyyy-MM-dd 00:00:00"));

        $("#findnoworkstarttime_timee").val((getDateByChange(new Date(), 0)).Format("yyyy-MM-dd 23:59:59"));



        $(function () {
            spsetBaseNoBt("yw_baseinfo", "id", "yw_baseinfo as T", "*", "#tablelist", "sctaskoutstore", "生产任务管理", "sctaskoutstore");
            ////基地
            //hcdoselbyPost("BranchID as id,BranchName as name", "mrbranch", "type='本部'", "", "", "id", function (data) {
            //    SetSelectWithArrayIdName("#finddatabranchid", data); $("#finddatabranchid").val(HCUser.HCUorg);
            //});
            layui.use(['form'], function () {
                uiform = layui.form();
                ////人员下拉加载
                //hcdoselbyPost("empid  as id,concat(depname,'-',empname) as name,empname as username,mobile as  tel,depname as address", "view_user", "branchid='" + HCUser.HCUorg + "'", "", "", "id",
                //    function (data) {
                //        SetSelectWithArrayIdName("#inoutusernamesel", data);
                //        uiform.render();
                //    });
            });

            hcrainpage(1);
        });
        function loadtaskinfo(id, taskno) {
            $("#lb_taskno").text(taskno);
            hcapiget("../api/Hcrain/GetWorkAllInfoToEndByTaskIdNew", {
                "taskordcid": id, "includedk": $("#c_dcinfo").is(':checked')
                , "infodt1start": "", "infodt1end": ""
                , "includeCenter": true,
                "noworkstarttimes": $("#findnoworkstarttime_times").val(),
                "noworkstarttimee": $("#findnoworkstarttime_timee").val()

            }, function (data) {
                //console.log(data);
                var result = JSON.parse(data);
                //console.log(result);
                // hcvueapp.taskallinfo = result;
                hcvueapp.task = result.task[0];
                hcvueapp.allworks = result.allworks;
                console.log(hcvueapp.allworks);
                //var apptaskworkinfo = result.taskwork;
                //var apptaskworkinfobj = JSON.parse(JSON.stringify(apptaskworkinfo));
                ////去掉 备注的
                //for (var i = 0, flag = true, len = apptaskworkinfo.length; i < len; flag ? i++ : i) {
                //    if (apptaskworkinfo[i] && apptaskworkinfo[i].infotype == 14) {
                //        apptaskworkinfo.splice(i, 1);
                //        flag = false;
                //    } else {
                //        flag = true;
                //    }
                //}
                ////只要备注的
                //for (var i = 0, flag = true, len = apptaskworkinfobj.length; i < len; flag ? i++ : i) {
                //    if (apptaskworkinfobj[i] && apptaskworkinfobj[i].infotype != 14) {
                //        apptaskworkinfobj.splice(i, 1);
                //        flag = false;
                //    } else {
                //        flag = true;
                //    }
                //}
                //var appdcworkinfo = result.dcwork;
                //var appdcworkinfobj = JSON.parse(JSON.stringify(appdcworkinfo));
                ////去掉 备注的
                //for (var i = 0, flag = true, len = appdcworkinfo.length; i < len; flag ? i++ : i) {
                //    if (appdcworkinfo[i] && appdcworkinfo[i].infotype == 14) {
                //        appdcworkinfo.splice(i, 1);
                //        flag = false;
                //    } else {
                //        flag = true;
                //    }
                //}
                ////只要备注的
                //for (var i = 0, flag = true, len = appdcworkinfobj.length; i < len; flag ? i++ : i) {
                //    if (appdcworkinfobj[i] && appdcworkinfobj[i].infotype != 14) {
                //        appdcworkinfobj.splice(i, 1);
                //        flag = false;
                //    } else {
                //        flag = true;
                //    }
                //}
                ////合并 备注
                //var allbj = apptaskworkinfobj.concat(appdcworkinfobj);
                //hcvueapp.taskwork = apptaskworkinfo;
                //hcvueapp.taskworkbj = allbj;
                //hcvueapp.dcwork = appdcworkinfo;
                //hcvueapp.taskGet = result.taskGet;
                //hcvueapp.seftjgout = result.seftjgout;
                //hcvueapp.seftjgend = result.seftjgend;
                //hcvueapp.sefttocenter = result.sefttocenter;
                //hcvueapp.pccenterin = result.pccenterin;
                //hcvueapp.pccenterjgout = result.pccenterjgout;
                //hcvueapp.pccenterjgend = result.pccenterjgend;
                //hcvueapp.taskcodeinfo = result.taskcodeinfo;
                //hcvueapp.pccenterouttoend = result.pccenterouttoend;

            });
        }
        function hcrainpage(curr) {
            var suminfowhere1 = "";

            //if ($("#finddatabranchid").val()) {
            //    suminfowhere1 += " and t.databranchid= " + $("#finddatabranchid").val();
            //}
            //if ($("#findtaskstarttime_times").val()) {
            //    suminfowhere1 += " and t.taskstarttime>='" + $("#findtaskstarttime_times").val() + " 00:00:00'";

            //}
            //if ($("#findtaskstarttime_timee").val()) {
            //    suminfowhere1 += " and t.taskstarttime<='" + $("#findinfodt1_timee").val() + " 23:59:59'";
            //}
            if ($("#findtasksctypename").val()) {
                suminfowhere1 += " and t.tasksctypename like '%" + $("#findtasksctypename").val() + "%'";
            }
            if ($("#findmaindcinfo").val()) {
                suminfowhere1 += " and b.fv1 like '%" + $("#findmaindcinfo").val() + "%'";
            }
            if ($("#findtaskno").val()) {
                suminfowhere1 += " and t.taskno like '%" + $("#findtaskno").val() + "%'";
            }
            $.ajax({
                type: "post",
                url: "../ashx/spui.ashx",
                data: {
                    "action": "getpageinfo",
                    "pagenow": curr || 1,
                    "pagesize": 2,
                    "select": "t.taskno,t.tasksctypename,b.fv1,t.id",
                    "table": "hsc_task as t INNER JOIN  yw_baseinfo b on t.maindcid=b.id ",
                    "group": "",
                    "having": "",
                    "where": " 1=1 " + suminfowhere1,
                    "order": "",
                    "subinfo": ""//子查询   当前物品+当前机构+库存大于0
                },
                async: true,
                cache: false,
                error: function (error) {

                },
                success: function (data) {
                    var result = JSON.parse(data);
                    hcvueapp.listinfo = result.data;
                    if (hcvueapp.listinfo.length == 1) {
                        loadtaskinfo(hcvueapp.listinfo[0].id, hcvueapp.listinfo[0].taskno);
                    }
                    //显示分页
                    laypage({
                        cont: 'page1', //容器。值支持id名、原生dom对象，jquery对象。【如该容器为】：<div id="page1"></div>
                        pages: result.message || 0, //通过后台拿到的总页数
                        curr: curr || 1, //当前页
                        jump: function (obj, first) { //触发分页后的回调
                            if (!first) { //点击跳页触发函数自身，并传递当前页：obj.curr
                                hcrainpage(obj.curr);
                            }
                        }
                    });

                }
            });
        };

        //重新加载-重载
        function findreolad(isback) {
            hcrainpage(1);
        }


        function getDateByChange(date, days) {
            if (days == undefined || days == '') {
                days = 1;
            }
            var date = new Date(date);
            date.setHours(date.getHours() - days);
            return date;

        }

    </script>
</body>
</html>
